<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'club-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Els camps amb <span class="required">*</span> són obligatoris.</p>

	<?php echo $form->errorSummary($model); ?>

    <br/>
    <h3>Dades del Club:</h3>

    <?php
    /*
	<div class="row">
		<?php echo $form->labelEx($model,'dataAlta'); ?>
		<?php echo $form->textField($model,'dataAlta'); ?>
		<?php echo $form->error($model,'dataAlta'); ?>
	</div>
     * 
     */
    ?>
    
    <div class="row">
        <?php echo $form->labelEx($model,'dataAlta'); ?>
        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'model'=>$model,
            'language'=>'ca',
            'attribute'=>'dataAlta',
            'value'=>$model->dataAlta,
            // additional javascript options for the date picker plugin
            'options'=>array(
                'showAnim'=>'fold',
                'showButtonPanel'=>true,
                'autoSize'=>true,
                'dateFormat'=>'dd/mm/yy',
                'defaultDate'=>$model->dataAlta,
                //'buttonImage'=>Yii::app()->baseUrl.'/images/icons/calendari.png',
                'buttonImageOnly'=>true,
                'buttonText'=>'Triar data',
                'selectOtherMonths'=>true,
                //'showOn'=>'button',
                'showOtherMonths'=>true,
                'changeMonth'=>'true',
                'changeYear'=>'true,'
            ),
        ));
        ?>
        <?php echo $form->error($model,'data'); ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'nom'); ?>
		<?php echo $form->textField($model,'nom',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'nom'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'domicili'); ?>
		<?php echo $form->textField($model,'domicili',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'domicili'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'codiPostal'); ?>
		<?php echo $form->textField($model,'codiPostal' ,array('size'=>5,'maxlength'=>5)); ?>
		<?php echo $form->error($model,'codiPostal'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'poblacio'); ?>
		<?php echo $form->textField($model,'poblacio',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'poblacio'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'provincia'); ?>
		<?php echo $form->textField($model,'provincia',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'provincia'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'CIF'); ?>
		<?php echo $form->textField($model,'CIF',array('size'=>9,'maxlength'=>9)); ?>
		<?php echo $form->error($model,'CIF'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'telFix'); ?>
		<?php echo $form->textField($model,'telFix' ,array('size'=>9,'maxlength'=>9)); ?>
		<?php echo $form->error($model,'telFix'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'telMobil'); ?>
		<?php echo $form->textField($model,'telMobil', array('size'=>9,'maxlength'=>9)); ?>
		<?php echo $form->error($model,'telMobil'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'eMail'); ?>
		<?php echo $form->textField($model,'eMail',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'eMail'); ?>
	</div>

    <div class="row">
		<?php echo $form->labelEx($model,'rebreMail'); ?>
        <?php echo $form->dropDownList($model, 'rebreMail',
            array('N'=>'No','S'=>'Sí' ));?>
        <?php echo $form->error($model,'rebreMail'); ?>
	</div>
    
	<div class="row">
		<?php echo $form->labelEx($model,'web'); ?>
		<?php echo $form->textField($model,'web',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'web'); ?>
	</div>

    <br/>
    <h3>Dades director/a del Club:</h3>

    <div class="row">
		<?php echo $form->labelEx($model,'directorNom'); ?>
		<?php echo $form->textField($model,'directorNom',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'directorNom'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'directorMobil'); ?>
		<?php echo $form->textField($model,'directorMobil' ,array('size'=>9,'maxlength'=>9)); ?>
		<?php echo $form->error($model,'directorMobil'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'directorEMail'); ?>
		<?php echo $form->textField($model,'directorEMail',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'directorEMail'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->